package guda.house.biz.form;

import guda.house.dal.dataobject.BuildingDO;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;


public class BuildingForm {

    @NotNull(message = "不能为空")
    private Long villageId;
    @Size(min=1,max=10,message = "长度为1到10个字符")
    private String buildingName;

    private Long buildingTypeId;

    private Integer floorCount;

    private Integer buildingUnit;


    public BuildingDO toDO() {
        BuildingDO buildingDO = new BuildingDO();
        buildingDO.setBuildingName(buildingName);
        buildingDO.setBuildingUnit(buildingUnit);
        buildingDO.setFloorCount(floorCount);
        buildingDO.setVillageId(villageId);
        return buildingDO;
    }

    public Long getVillageId() {
        return villageId;
    }

    public void setVillageId(Long villageId) {
        this.villageId = villageId;
    }

    public String getBuildingName() {
        return buildingName;
    }

    public void setBuildingName(String buildingName) {
        this.buildingName = buildingName;
    }

    public Long getBuildingTypeId() {
        return buildingTypeId;
    }

    public void setBuildingTypeId(Long buildingTypeId) {
        this.buildingTypeId = buildingTypeId;
    }

    public Integer getFloorCount() {
        return floorCount;
    }

    public void setFloorCount(Integer floorCount) {
        this.floorCount = floorCount;
    }

    public Integer getBuildingUnit() {
        return buildingUnit;
    }

    public void setBuildingUnit(Integer buildingUnit) {
        this.buildingUnit = buildingUnit;
    }
}
